package cn.zbacm.api.security;

import cn.zbacm.api.user.entity.User;
import lombok.Getter;
import lombok.Setter;
import org.springframework.security.core.GrantedAuthority;

import java.util.Collection;

@Getter
@Setter
public class CustomUser extends org.springframework.security.core.userdetails.User {
  private User user;

  public CustomUser(
          String username,
          String password,
          Collection<? extends GrantedAuthority> authorities,
          User user) {
    super(username, password, authorities);
    this.user = user;
  }
}
